From 5d029d9e944c5d81a0cbde90dc58383fc368cf34 Mon Sep 17 00:00:00 2001 From: Matt Brubeck Date: Fri, 12 Sep 2014 18:05:10 -0700 Subject: [PATCH] Better fix for tests on the Mac builders --- tests/test_cargo_compile_path_deps.rs | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/tests/test_cargo_compile_path_deps.rs b/tests/test_cargo_compile_path_deps.rs index 86070cee4..18be3e75a 100644 --- a/tests/test_cargo_compile_path_deps.rs +++ b/tests/test_cargo_compile_path_deps.rs @@ -1,6 +1,6 @@ -use std::io::{fs, File, TempDir, UserRWX}; +use std::io::{fs, File, UserRWX}; -use support::{ProjectBuilder, ResultTest, project, execs, main_file, cargo_dir, path2url}; +use support::{ResultTest, project, execs, main_file, cargo_dir, path2url}; use support::{COMPILING, RUNNING}; use support::paths::{mod, PathExt}; use hamcrest::{assert_that, existing_file}; @@ -632,8 +632,7 @@ test!(override_path_dep { }) test!(path_dep_build_cmd { - let tmpdir = TempDir::new("cargo").unwrap(); - let p = ProjectBuilder::new("foo", tmpdir.path().clone()) + let p = project("foo") .file("Cargo.toml", r#" [project] @@ -669,7 +668,10 @@ test!(path_dep_build_cmd { "#); assert_that(p.cargo_process("build"), - execs().with_status(0)); + execs().with_stdout(format!("{} bar v0.5.0 ({})\n\ + {} foo v0.5.0 ({})\n", + COMPILING, p.url(), + COMPILING, p.url()))); assert_that(&p.bin("foo"), existing_file()); @@ -684,7 +686,10 @@ test!(path_dep_build_cmd { } assert_that(p.process(cargo_dir().join("cargo")).arg("build"), - execs().with_status(0)); + execs().with_stdout(format!("{} bar v0.5.0 ({})\n\ + {} foo v0.5.0 ({})\n", + COMPILING, p.url(), + COMPILING, p.url()))); assert_that( cargo::util::process(p.bin("foo")), -- 2.30.2